<?php
// multiply.php, multiply.common.php, multiply.server.php
// demonstrate a very basic xajax implementation
// using xajax version 0.2
// http://xajaxproject.org
include_once './include.php';
include_once (WEB_ROOT."admin/include/xajax_common.php");

function positionT($value,$id){
	global $dbtable,$dbconn;
	$objresponse = new xajaxResponse();
	if (!empty($value) && !empty($id)){
		$query = "update $dbtable->prodT set zposition=$value where zid=$id";
		if ($dbconn->Query($query)){
			$checkresult = "<span>修改成功！</span>";	
		}else {
			$checkresult = "<span>修改失败！</span>";	
		}
	}
	$objresponse->addassign("result","innerHTML",$checkresult);//指定ID为result的元素中添加内容$checkresult
	return $objresponse;//返回结果文本
}
function positionP($value,$id){
	global $dbtable,$dbconn;
	$objresponse = new xajaxResponse();
	if (!empty($value) && !empty($id)){
		$query = "update $dbtable->prod set zposition=$value where zid=$id";
		if ($dbconn->Query($query)){
			$checkresult = "<span>修改成功！</span>";	
		}else {
			$checkresult = "<span>修改失败！</span>";	
		}
	}
	$objresponse->addassign("result","innerHTML",$checkresult);//指定ID为result的元素中添加内容$checkresult
	return $objresponse;//返回结果文本
}
$xajax->processRequests();

?>